package com.example.wechat;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class MyReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {//当收到广播之后干事情
        //启动serice1放歌
        Intent intent1=new Intent(context, MyService1.class);
        context.startService(intent1);//开启服务intent1

        // TODO: This method is called when the BroadcastReceiver is receiving
        // an Intent broadcast.
        Log.d("jd","短信接受音乐");
        throw new UnsupportedOperationException("Not yet implemented");
    }
}